﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.ServiceModel;

namespace MyWcfRestLib.Files
{
    public class FileTransferService : WcfService
    {
        public FileTransferService(int port) : base(port) { }

        protected override string ServiceName
        {
            get { return "Files"; }
        }

        protected override Type ServiceType
        {
            get { return typeof(FileTransfer); }
        }

        protected override void AddTheService()
        {
            Debug.Assert(null != ServiceHost);

            // Add application endpoint
            ServiceHost.AddServiceEndpoint(
                typeof(IFileTransfer),
                new WebHttpBinding() { MaxReceivedMessageSize = Constant.MaxMessageSize },
                "");

        }
    }
}
